package bar.dark.lee.setting;

import bar.dark.lee.R;
import bar.dark.lee.SuperActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.TextView;

public class TipInfoActivity extends SuperActivity
{
	private TextView tipTextView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setGoneTipButton();
		
		setContentView(R.layout.tip_info_activity);
		setFindView();
		setData();
	}
	
	private void setFindView()
	{
		tipTextView = (TextView) findViewById(R.id.tipInfoTextView);
	}
	
	private void setData()
	{
		Intent intent = getIntent();
		
		int tipFlag = intent.getIntExtra(TipsActivity.TIP_REQUEST_KEY, -1);
		
		tipTextView.setText(Html.fromHtml(getTip(tipFlag)));
	}

	/**
	 * 도움말의 내용을 번호 플래그에 맞게 가져와서 리턴한다.
	 * @param tipFlag
	 * @return
	 */
	private String getTip(int tipFlag)
	{
		String massage = "";
		
		switch (tipFlag)
		{
			case TipsActivity.TIP_MAIN:
			{
				setTitle("메인 화면");
				massage = getResources().getString(R.string.tip_main);
				break;
			}
			case TipsActivity.TIP_INSERT:
			{
				setTitle("가계부 입력");
				massage = getResources().getString(R.string.tip_insert);
				break;
			}
			case TipsActivity.TIP_SELECT:
			{
				setTitle("가계부 조회");
				massage = getResources().getString(R.string.tip_select);
				break;
			}
//			case TipsActivity.TIP_UPDATE:
//			{
//				setTitle("");
//				massage = getResources().getString(R.string.tip_update);
//				break;
//			}
//			case TipsActivity.TIP_DELETE:
//			{
//				setTitle("");
//				massage = getResources().getString(R.string.tip_delete);
//				break;
//			}
			case TipsActivity.TIP_CASH:
			{
				setTitle("입출금/대금결제");
				massage = getResources().getString(R.string.tip_cash);
				break;
			}
			case TipsActivity.TIP_CATEGORY:
			{
				setTitle("카테고리");
				massage = getResources().getString(R.string.tip_category);
				break;
			}
			case TipsActivity.TIP_AUTOBANK:
			{
				setTitle("통장/신용카드 자동화");
				massage = getResources().getString(R.string.tip_autobank);
				break;
			}
			case TipsActivity.TIP_AUTOMYBANK:
			{
				setTitle("내통장이체 자동화");
				massage = getResources().getString(R.string.tip_automybank);
				break;
			}
			case TipsActivity.TIP_DATABANKUP:
			{
				setTitle("데이터 복구 및 백업");
				massage = getResources().getString(R.string.tip_databankup);
				break;
			}
			case TipsActivity.TIP_AUTOMASSAGE:
			{
				setTitle("결제 문자 자동화");
				massage = getResources().getString(R.string.tip_automassage);
				break;
			}
			case TipsActivity.TIP_STARTDATE:
			{
				setTitle("월시작일 / 통화설정");
				massage = getResources().getString(R.string.tip_startdate);
				break;
			}
			case TipsActivity.TIP_VIEWTYPE:
			{
				setTitle("메인/위젯 표시항목");
				massage = getResources().getString(R.string.tip_viewtype);
				break;
			}
			case TipsActivity.TIP_MANAGER:
			{
				setTitle("자산관리");
				massage = getResources().getString(R.string.tip_manager);
				break;
			}
			case TipsActivity.TIP_STATS:
			{
				setTitle("통계");
				massage = getResources().getString(R.string.tip_stats);
				break;
			}
			case TipsActivity.TIP_FAN:
			{
				setTitle("부채");
				massage = getResources().getString(R.string.tip_fan);
				break;
			}
			case TipsActivity.TIP_DEVELOPER:
			{
				setTitle("개발자");
				massage = getResources().getString(R.string.tip_developer);
				break;
			}
			case TipsActivity.TIP_PASSWORD:
			{
				setTitle("비밀번호");
				massage = getResources().getString(R.string.tip_password);
				break;
			}
			case TipsActivity.TIP_EXCEL:
			{
				setTitle("엑셀로 데이터 빼기");
				massage = getResources().getString(R.string.tip_excel);
				break;
			}
			case TipsActivity.TIP_BUDGET:
			{
				setTitle("예산");
				massage = getResources().getString(R.string.tip_budget);
				break;
			}
			case TipsActivity.TIP_MEMO:
			{
				setTitle("메모 기능");
				massage = getResources().getString(R.string.tip_memo);
				break;
			}
		}
		
		return massage;
	}

	@Override
	protected void tipButton()
	{
	}
}
